﻿using System.Collections;
using System;

namespace com.fly.sms
{
    public class StringUtil
    {
        public static bool isEmpty(string obj)
        {
            return obj == "" || obj == null;
        }

        public static string GetOID()
        {
            long i = 1;
            foreach (byte b in Guid.NewGuid().ToByteArray())
            {
                i *= ((int)b + 1);
            }
            return string.Format("{0:x}", i - DateTime.Now.Ticks);
        }

        public static long GetNumberOID()
        {
            byte[] buffer = Guid.NewGuid().ToByteArray();
            return BitConverter.ToInt64(buffer, 0);
        } 
    }
}